home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM Gold
/
Light ROM Gold.iso
/
arexx
/
modeler
/
pos_rel.lwm
< prev
next >
Wrap
Text File
|
1993-12-25
|
1KB
|
51 lines
-------------------------------begin "PosRel.lwm"----------------------
/* CMD: PositionRelati
ve=09=09=09=09=09=09=09=09=09=09=09=09=09*
* $VER: V1.0=09=09=09=09 *
* Move object to relative centerof object in bg layer, *
*=09=09=09=09=0
9=09=09=09=09=09=09 using Bounding Box center, */
/* By Darren Reid, =A91993 Innovision Strategic Communications. */
libadd =3D addlib("LWModelerARexx.port",0)
signal on error
signal on syntax
bglayer =3D CURBLAYER()
fglayer =3D CURLAYER()
call setlayer(bg
layer)
box=3Dboundingbox() /* Should check out empty list ... */
parse var box n x1 x2 y1 y2 z1 z2
cx=3D(x2+x1)/2
cy=3D(y2+y1)/2
cz=3D(z2+z1)/2
call setlayer(fglayer)
box=3Dboundingbox() /* Should check out empty list ... */
parse var box n x1 x2 y1 y2 z1 z2
px=3D(x2+x1)/2
py=3D(y2+y1)/2
pz=3D(z2+z1)/2
dx =3D (cx - px)
dy =3D (cy - py)
dz =3D (cz
- pz)
call MOVE(dx dy dz)
if (libadd) then call remlib("LWModelerARexx.port")
exit
syntax:
error:
=09t=3DNotify(1,'!Rexx Script Error','@'ErrorText(rc),'Line 'SIGL)
if (libadd) then call
remlib("LWModelerARexx.port")
=09exit
---------------------------end------------------------------------------